package com.whz.enumdemo;

/**
 * @Author: sinosoft
 * @Description:
 * @Date: Create in 19:09 2021/5/13
 * @Modified By:
 */
public class PayrollDayMainTest {
    public static void main(String[] args) {
        int pay1 = PayrollDay.MONDAY.pay(1200, 8);
        System.out.printf("获取薪资: %d%n", pay1);
        int pay2 = PayrollDayStrategy.SUNDAY.pay(1200, 6);
        System.out.printf("获取薪资: %d%n", pay2);

        int ordinal0 = PayrollDayStrategy.MONDAY.ordinal();
        System.out.printf("获取序列: %d%n", ordinal0);
        /*
        * 返回每个枚举常量在类型中的数字位置
        * */
        int ordinal1 = PayrollDayStrategy.THURSDAY.ordinal();
        System.out.printf("获取序列: %d%n", ordinal1);
    }
}
